#pragma once
#include <iostream>
#include <string>
#include "ShowLog.h"

class Printable 
{
public: 
	virtual std::string GetClassName() = 0;
};


class Entity:public Printable
{
public:
	Entity();
	~Entity();
	virtual std::string GetName()=0;
	std::string GetClassName() override { return "Entity"; }

private:

};

class Player :public Entity, Printable
{
public:
	std::string m_Name;
	Player(const std::string& name) : m_Name(name) {};
	~Player();

	std::string GetName() override { return m_Name; }
	std::string GetClassName() override { return "Player"; }

private:

};


void Print(Printable* obj)
{
	LOG(obj->GetClassName());
}


int RunExample030()
{
	Entity* e = new Player("waa");
	LOG(e->GetClassName());

	Entity* e1 = new Player("PP");
	LOG(e1->GetClassName());

	Print(e);
	Print(e1);

	return 0;
}
